<?
  include("com/website_config.php");
  $pathurltrue=__FILE__;
  $pathurl=basename($pathurltrue,".php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>案例展示-<? echo $title;?></title>
<link rel="shortcut icon" href="/favicon.ico"/>
<link href="css/css.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="http://www.ashlybus.com/js/jquery-1.9.1.min.js"></script>
<script> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?429d331d02551c5c42fbfb2982cfcf64"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script>
</head>

<body>
<? include("top.php");?>

<div class="jiange"></div>
<?
	/*
	 * 查询产品
	 */  
	  $id=(int)$_GET["detail_id"];//$_GET方式获得url传递过来的id参数，
	  $typeid=(int)$_GET['typeid'];//分类ID
	  //查分类的父分类pid
	  $sql1 = "select * from ms_protype where type_id=$typeid";//根据传递过来的参数查询出来相应的记录
	  $result1 = $db->query($sql1);//执行查询
	  $array1=mysql_fetch_array($result1);
	  $pid=$array1['pid'];

	  $sql = "select * from ms_product where pro_id=$id";//根据传递过来的参数查询出来相应的记录
	  $result = $db->query($sql);//执行查询
	  $array=mysql_fetch_array($result);
	  $pro_title=$array['pro_title'];
	  $content=$array['pro_content'];
	  $pro_adddate=$array['pro_adddate'];
?>
<div class="nowplace">当前位置：<span><a href="/">首页</a></span><span>&nbsp;>&nbsp;</span><span><? echo $pro_title;?></span></div>

<div class="jiange"></div>
<div class="innerbox">
  <div class="innerBigonepage">
     	  
          <div class="inner_listbox">
               <ul>
                 
          	<div class="details_h1 c"><h2><? echo $pro_title;?></h2></div>
			<div class="article_detail">
               <p><? echo $content;?></p>
			   <?
			   //从相册中查询图
		  $pro_id=$array['pro_id'];
		  $photoSQL="select * from ms_product_photo where pro_id=$pro_id";
		  $rs=$db->query($photoSQL);
		  while($photoArray=mysql_fetch_array($rs)){
		  
		   $pro_pic=$photoArray["img_path"];
		   $proimgpath=str_replace("../../","","$pro_pic");//图片路径重置

		   if(!file_exists($proimgpath)){//图片不存在
			echo "<img src='images/nopic.jpg' border='0' width='220' height='158' />";							
		   }else{
			   ?>
                 <p><img src="<? echo $proimgpath; ?>" /></p>
				<? 
		 }
		 }
		?> 
             </div>
                  
                  
               </ul>
               <div class="cl"></div>
              
          </div>
     </div>
     <div class="cl"></div>
</div>





<? include("foot.php");?>
</body>
</html>
